﻿using AJWPFAdmin.Core.Mvvm;
using DocumentFormat.OpenXml.Office2013.Excel;
using Prism.Commands;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace AJWPFAdmin.Core.Components.AJTable.ViewModels
{
    public class AJTableColumnSettingDrawerContentViewModel : ViewModelBase
    {
        private IEnumerable<AJTableColumnItem> _columns;
        public IEnumerable<AJTableColumnItem> Columns
        {
            get { return _columns; }
            set { SetProperty(ref _columns, value); }
        }

        public event EventHandler<AJTableColumnItem> ColumnVisibleChange;

        private DelegateCommand<AJTableColumnItem> _columnVisibleChangeCmd;
        public DelegateCommand<AJTableColumnItem> ColumnVisibleChangeCmd => _columnVisibleChangeCmd ??= new DelegateCommand<AJTableColumnItem>(ExecuteColumnVisibleChangeCmd);

        void ExecuteColumnVisibleChangeCmd(AJTableColumnItem columnItem)
        {
            ColumnVisibleChange?.Invoke(this, columnItem);
        }

        public AJTableColumnSettingDrawerContentViewModel()
        {

        }
    }
}
